<?php
/**
 * Created by PhpStorm.
 * User: kcj
 * Date: 2017/3/17
 * Time: 21:11
 */
namespace app\index\controller;

use think\Controller;
use app\index\model\User;
use app\common\Jssdk;

class Config extends Controller
{
    protected function _initialize()
    {
        header("Access-Control-Allow-Origin: *");

    }

    public function getserver()
    {
        $data=array(
            //'host' => "g.idiange.cn",
            'host' => "127.0.0.1",
            'port' => 8282,
        );
        return json($data);
    }

    public function getweinxininfo($url)
    {
        $jssdk = new JSSDK("wxfddcd87daadba25e", "d99a16827e59351c97e3355eebd7fe31");//更新成你的微信appId/appSecret
        $signPackage = $jssdk->GetSignPackage($url);

        return json($signPackage);
    }
}